﻿using System;

namespace SharpRomans.Tests.Support
{
	internal static class TimeSpanCreation
	{
		public static TimeSpan Seconds(this int seconds)
		{
			return TimeSpan.FromSeconds(seconds);
		}

		public static DateTimeOffset January(this int day, int year)
		{
			return new DateTimeOffset(year, 1, day, 0, 0, 0, TimeSpan.Zero);
		}

		public static DateTimeOffset March(this int day, int year)
		{
			return new DateTimeOffset(year, 3, day, 0, 0, 0, TimeSpan.Zero);
		}

		public static DateTimeOffset September(this int day, int year)
		{
			return new DateTimeOffset(year, 9, day, 0, 0, 0, TimeSpan.Zero);
		}

		public static DateTimeOffset October(this int day, int year)
		{
			return new DateTimeOffset(year, 10, day, 0, 0, 0, TimeSpan.Zero);
		}

		public static DateTimeOffset At(this DateTimeOffset dt, int hour, int minute, int second, int miliSecond)
		{
			return new DateTimeOffset(dt.Year, dt.Month, dt.Day, hour, minute, second, miliSecond, TimeSpan.Zero);
		}
	}
}
